<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/head.jsp"%>
<div class="bjui-pageContent">
	<h3>${modifybean.name }</h3>
	<form action="${ctx}/sys/addQuesUser.do" id="j_custom_form" data-toggle="ajaxform">
		<input type="hidden" value="${modifybean.id}" name="quesId" />
		<div class="col-1">
			<c:forEach items="${list }" var="item">
				<fieldset>
					<legend style="font-weight: normal;">${item.name }：</legend>
					<c:forEach items="${item.list }" var="itemlist" varStatus="itemliststa">
						<div class="bs-callout bs-callout-warning">
							<h4>${itemliststa.count}.${itemlist.question }</h4>
							<c:if test="${itemlist.typesel=='单选' }">
								<p>
									<c:forEach items="${itemlist.list}" var="ansitem">
										<input type="radio" id="scored_${ansitem.id}" value="${ansitem.id }" disabled="disabled"> ${ansitem.options }<br />
									</c:forEach>
								</p>
							</c:if>
							<c:if test="${itemlist.typesel=='多选' }">
								<p>
									<c:forEach items="${itemlist.list}" var="ansitem">
										<input type="checkbox" id="scored_${ansitem.id}" value="${ansitem.id }" disabled="disabled"> ${ansitem.options }<br />
									</c:forEach>
								</p>
							</c:if>
							<c:if test="${itemlist.typesel=='填空' }">
								<p>
									<input type="text" id="scoredt_${itemlist.id}" data-rule="" readonly="readonly" size="100">
								</p>
							</c:if>
							<c:if test="${itemlist.typesel=='文本' }">
								<p>
									<textarea rows="5" cols="100" id="scoredt_${itemlist.id}" class="layui-textarea" readonly="readonly"></textarea>
								</p>
							</c:if>
						</div>
					</c:forEach>
				</fieldset>
			</c:forEach>


		</div>
	</form>
</div>
<div class="bjui-pageFooter">
	<ul>
		<!-- 		<li> -->
		<!-- 			<button type="button" class="btn-close" data-icon="close">取消</button> -->
		<!-- 		</li> -->
		<!-- 		<li> -->
		<!-- 			<button type="submit" class="btn-default" data-icon="save">保存</button> -->
		<!-- 		</li> -->
	</ul>
</div>
<script type="text/javascript">
 	var qresult = ${quesUser.qresult};
 	for(var i = 0;i < qresult.length; i++){
 		if(qresult[i].type=='单选' || qresult[i].type=='多选'){
 			var options=qresult[i].options ;
 			for(var j = 0;j<options.length;j++){
 				$("#scored_"+options[j]).attr("checked","checked");
 			}
 		}else{
 			$("#scoredt_"+qresult[i].options).val(qresult[i].text);
 		}
 	}
</script>
